package com.czr.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.czr.entity.Blog;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Description:
 * Author: czr czr
 * Version: 1.0
 * Create Date Time: 2021/11/19 9:25.
 * Update Date Time:
 */
public interface BlogMapper extends BaseMapper<Blog> {

    IPage<Blog> findChildrenBlogByYear(IPage<Blog> page, @Param(Constants.WRAPPER) Wrapper<Blog> wrapper);

    /**
     * 分组查询对应的年份
     * @return String
     */
    List<String> findBlogYearGroup();

    /**
     * 根据年份查询对应分页数据
     * @return Integer
     */
    List<Integer> queryBlogYearGroup();

}
